package cz.muni.fi.pb138.videoweb2013.servlets;

import cz.muni.fi.pb138.videoweb2013.backend.XSLT;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import net.sourceforge.stripes.action.ActionBean;
import net.sourceforge.stripes.action.ActionBeanContext;
import net.sourceforge.stripes.action.Before;
import net.sourceforge.stripes.action.DefaultHandler;
import net.sourceforge.stripes.action.ForwardResolution;
import net.sourceforge.stripes.action.Resolution;
import net.sourceforge.stripes.action.UrlBinding;

/**
 * class preserving all mediums in html tagged string for further processing
 *
 * @author Filip
 */
@UrlBinding("/action/Mediums.jsp")
public class MediumsActionBean implements ActionBean{
   private ActionBeanContext context;
   XSLT xsl = new XSLT();
   private String sign;

    public MediumsActionBean() throws TransformerConfigurationException, TransformerException {
        this.sign = xsl.transform();
    }

  
    public ActionBeanContext getContext() {
        return context;
    }

    public void setContext(ActionBeanContext context) {
        this.context = context;
    }
    
    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    @Before
    @DefaultHandler
    public Resolution print() {
        return new ForwardResolution("/Mediums.jsp");
    }
    

}
